import os.path


class Config:
    DEBUG = True
    # 配置数据库的连接路径
    SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:root@localhost:3306/flaskblog02'
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    SECRET_KEY = 'qiqibabawobalabala'
    # 项目路径
    BASE_DIR = os.path.dirname(os.path.abspath(__file__))
    # 静态文件夹的路径,项目路径拼接向下的文件夹
    STATIC_DIR = os.path.join(BASE_DIR, 'static')
    TEMPLATES_DIR = os.path.join(BASE_DIR, 'templates')
    UPLOAD_ICON_DIR = os.path.join(BASE_DIR, 'static/image/upload/icon')
    UPLOAD_PHOTO_DIR = os.path.join(BASE_DIR, 'static/image/upload/photo')


class DevelopmentConfig(Config):
    ENV = 'development'
